1 00:00:00,780 --> 00:00:01,140 Okay. 2 00:00:01,140 --> 00:00:04,440 So in this video, we're going to be taking a look at particle emitters. 3 00:00:04,440 --> 00:00:08,410 And as you would guess, they allow you to emit particles from parts. 4 00:00:08,430 --> 00:00:10,320 So I'll show you how to use them here real quick. 5 00:00:10,320 --> 00:00:15,930 I have my part that we got from our last lecture, and I can add an object in here, which is a particle 6 00:00:15,930 --> 00:00:16,500 emitter. 7 00:00:18,300 --> 00:00:21,900 And you should immediately see that our part is emitting particles. 8 00:00:21,900 --> 00:00:22,860 Very cool. 9 00:00:22,860 --> 00:00:26,550 And there's a bunch of properties in here that we can change. 10 00:00:26,790 --> 00:00:31,320 We can change the color, the light emission, the size, a whole bunch of stuff We're going to go through 11 00:00:31,320 --> 00:00:32,210 every single one. 12 00:00:32,220 --> 00:00:38,130 So first off, obviously you can change the color of your particles like maybe I want mine to be, Oh, 13 00:00:38,190 --> 00:00:38,870 I don't know. 14 00:00:38,880 --> 00:00:40,350 How about some red particles? 15 00:00:40,350 --> 00:00:41,070 There we go. 16 00:00:41,070 --> 00:00:43,110 We've got some red color particles. 17 00:00:43,440 --> 00:00:48,510 And of course, you can press these three dots here and actually animate over time what colors you want 18 00:00:48,510 --> 00:00:49,290 the particles to be. 19 00:00:49,290 --> 00:00:54,030 So maybe I want them to start off as red and later down the line in the lifetime of the particle. 20 00:00:54,030 --> 00:00:57,420 Maybe I want it to be more orange. 21 00:00:57,420 --> 00:00:59,970 Yellow, like some like that. 22 00:01:01,110 --> 00:01:07,260 So now you can see that my particles slowly throughout their lifetime are fading to become more of this 23 00:01:07,260 --> 00:01:08,190 orange color. 24 00:01:08,670 --> 00:01:13,410 The next thing here is light emission, and this is basically how the particles blend with other colors 25 00:01:13,410 --> 00:01:14,130 in your game. 26 00:01:14,130 --> 00:01:18,870 So I could set it to like ten, even though the max number for this is one, it'll still work the same. 27 00:01:18,870 --> 00:01:22,200 I can't really tell what color they are, so I usually just leave this off for now. 28 00:01:22,620 --> 00:01:27,420 Light influence is basically how you want your particles to be influenced by the lighting in your game. 29 00:01:27,420 --> 00:01:32,520 So for example, if these particles were like in a very dark area of your game and this light influences 30 00:01:32,520 --> 00:01:36,930 that one, you basically wouldn't be able to see the particles because it's too dark. 31 00:01:36,930 --> 00:01:41,700 But if you leave it at zero, then the particles aren't affected by lighting your game at all. 32 00:01:41,700 --> 00:01:46,290 They will always look like this no matter what light setting your particles are in in your game. 33 00:01:46,290 --> 00:01:50,940 The next one here is orientation, and this is basically how you want your particles to look. 34 00:01:50,940 --> 00:01:52,470 So right now it's facing the camera. 35 00:01:52,470 --> 00:01:57,090 Meaning if I move around this object, you see all the particles follow my camera. 36 00:01:57,180 --> 00:01:58,980 So they're always looking at me. 37 00:01:59,340 --> 00:02:02,610 But I can change it to maybe like facing camera world up. 38 00:02:03,000 --> 00:02:07,350 And basically what this does, it stops the particles from rotating horizontally. 39 00:02:07,350 --> 00:02:09,900 So as you can see, they're stuck like that. 40 00:02:10,290 --> 00:02:15,840 But if I put it back on facing camera, you see they still rotate with my camera even if I look down. 41 00:02:16,140 --> 00:02:23,400 Velocity parallel is pretty similar to facing camera rolled up, but they follow the velocity. 42 00:02:23,400 --> 00:02:29,250 So if I were to shoot out the particles from the side, they'd do the same effect but sideways and then 43 00:02:29,250 --> 00:02:30,960 velocity perpendicular. 44 00:02:31,110 --> 00:02:35,970 They yeah, they do that instead of being parallel, they're not perpendicular to the part that they're 45 00:02:35,970 --> 00:02:36,960 shooting out of. 46 00:02:37,350 --> 00:02:38,880 So that's kind of interesting. 47 00:02:39,810 --> 00:02:43,230 The next simple property is size, of course, so I can change the size. 48 00:02:43,230 --> 00:02:48,060 Maybe I want the particle to be like, Yeah, huge, huge particles. 49 00:02:48,060 --> 00:02:50,250 Or maybe I want them to be really tiny. 50 00:02:50,250 --> 00:02:53,730 I can just sit here and punch in some numbers to change the size of the particles. 51 00:02:53,730 --> 00:02:54,600 Easy as that. 52 00:02:54,810 --> 00:02:57,480 And of course, you can also adjust them over the lifetime. 53 00:02:57,480 --> 00:03:04,200 So maybe at the beginning I want them to be super large and then over time they shrink smaller and smaller. 54 00:03:04,200 --> 00:03:08,040 And I can click on this line to add extra points where I want to animate. 55 00:03:08,160 --> 00:03:09,750 So maybe I want to do something like this. 56 00:03:09,750 --> 00:03:10,470 I don't know. 57 00:03:11,530 --> 00:03:12,580 See how that looks. 58 00:03:13,420 --> 00:03:17,480 So they get small and they get big again, and then they get small and then they get big. 59 00:03:17,500 --> 00:03:20,020 So that's basically how this works. 60 00:03:20,020 --> 00:03:21,460 I'll just set it to one for now. 61 00:03:22,240 --> 00:03:24,070 Squash is an interesting one. 62 00:03:24,250 --> 00:03:28,600 It's basically how much you want them to be horizontally squashed. 63 00:03:28,600 --> 00:03:29,920 So I'll show an example here. 64 00:03:29,920 --> 00:03:36,400 If I set it to one, you see our particles got squashed horizontally and it can continue to squash them 65 00:03:36,580 --> 00:03:37,600 more and more. 66 00:03:38,860 --> 00:03:44,320 I'm not exactly sure what you want to use this for, but it's there if you want to use it. 67 00:03:45,040 --> 00:03:50,110 The next one here is texture, and this allows you to change the image of your particles. 68 00:03:50,470 --> 00:03:55,720 But if your game is published, you can actually add your own images in here and add whatever you like. 69 00:03:55,720 --> 00:03:57,700 But I'm just going to leave it at the default for now. 70 00:03:58,000 --> 00:03:59,140 Transparency. 71 00:03:59,140 --> 00:04:00,140 Pretty simple. 72 00:04:00,160 --> 00:04:06,100 One is fully transparent, can't see them point five, halfway transparent and zero. 73 00:04:06,100 --> 00:04:07,450 There is no transparency. 74 00:04:08,260 --> 00:04:13,180 The offset is basically the distance away. 75 00:04:13,180 --> 00:04:18,040 Or how should I say, it's basically how far away the particles won't render. 76 00:04:18,040 --> 00:04:24,370 So if I set this to five, if I'm within five studs of where these particles are being emitted, I won't 77 00:04:24,580 --> 00:04:26,140 I won't see the particles. 78 00:04:26,290 --> 00:04:31,120 Like once the particles get further than five studs away from me, then I can start seeing them and 79 00:04:31,120 --> 00:04:35,980 I can sit here and change how far away I want these particles to render on my screen. 80 00:04:36,370 --> 00:04:41,380 And the reason they use this is for layering multiple particle emitters together so they don't look 81 00:04:41,380 --> 00:04:41,920 weird. 82 00:04:43,240 --> 00:04:44,260 What's the next one? 83 00:04:44,320 --> 00:04:47,440 We already know what name and parent is emission direction. 84 00:04:47,860 --> 00:04:50,980 So this is basically what direction you want the particles to emit. 85 00:04:51,190 --> 00:04:56,290 Right now, that's set to the top, but I can emit from the left side of the part, so it's emitting 86 00:04:56,290 --> 00:05:02,020 from the left side of the part, or maybe the right side, maybe the front. 87 00:05:02,650 --> 00:05:04,000 That's just basically how this one works. 88 00:05:04,000 --> 00:05:08,140 Very simple enabled enables or disables the particle emitter. 89 00:05:08,140 --> 00:05:13,210 If I turn it off, they're no longer emits particles, turn it back on, it starts emitting particles. 90 00:05:13,210 --> 00:05:14,140 Pretty simple. 91 00:05:14,230 --> 00:05:18,050 Lifetime is how long you want your particles to live for. 92 00:05:18,070 --> 00:05:22,930 So right now it's set from 5 to 10, which basically means these particles will live anywhere from a 93 00:05:22,930 --> 00:05:25,630 minimum of 5 seconds to a maximum of 10 seconds. 94 00:05:25,630 --> 00:05:29,170 So I can change this to maybe like one and three. 95 00:05:29,170 --> 00:05:34,390 And you'll notice that my newly generated particles are living much shorter lifespans. 96 00:05:34,420 --> 00:05:36,640 The rate how many particles I want to emit. 97 00:05:36,730 --> 00:05:39,220 If I set it to 50, it's emitting more particles. 98 00:05:39,220 --> 00:05:45,760 If I set it to 100 a ton more or I could set it to one, it's only emitting one particle a second. 99 00:05:45,760 --> 00:05:50,590 But if I do ten, here's ten particles a second, 100 particles per second. 100 00:05:50,590 --> 00:05:52,990 You get the idea rotation. 101 00:05:53,260 --> 00:05:55,810 This sets a random rotation for the particle. 102 00:05:55,960 --> 00:05:56,800 So. 103 00:05:57,630 --> 00:06:02,790 If I set it to like 360, that means when these particles generate, they will be randomly rotated anywhere 104 00:06:02,790 --> 00:06:04,800 from 0 to 360 degrees. 105 00:06:04,800 --> 00:06:09,840 So as you can notice, these spikes coming off of these particles are no longer aligned anymore. 106 00:06:09,870 --> 00:06:14,100 If I were to set it back to zero, you'll see all of them are perfectly pointing up. 107 00:06:14,100 --> 00:06:20,280 But if I set it back to 360, all the particles will not orient themselves or randomly rotational speed. 108 00:06:21,040 --> 00:06:23,980 Basically another random thing run out, set to zero. 109 00:06:23,980 --> 00:06:29,710 But if I set it to like a max of ten now, these particles will rotate anywhere from 0 to 10 degrees 110 00:06:29,710 --> 00:06:30,580 every second. 111 00:06:32,700 --> 00:06:35,760 Speed how fast you want the particles to emit out of here. 112 00:06:35,760 --> 00:06:39,990 So if I set it to like 20 now they're shooting out of here super fast. 113 00:06:39,990 --> 00:06:43,890 And of course there's a minimum and a maximum, so you can randomize it. 114 00:06:44,100 --> 00:06:48,990 Maybe you want something to come out at five and you want others to come at it blazing fast speeds. 115 00:06:51,050 --> 00:06:51,980 Spread angle. 116 00:06:51,980 --> 00:06:53,120 Another simple one. 117 00:06:53,630 --> 00:06:56,090 Basically randomize how much of an. 118 00:06:56,120 --> 00:07:01,160 How much of a spread you want the particles to emit from so like from the x and Y direction if you imagine 119 00:07:01,160 --> 00:07:02,570 this as a 2D plane. 120 00:07:03,370 --> 00:07:06,730 So I can set it to like 25, 25. 121 00:07:06,730 --> 00:07:12,400 So these particles will now emit anywhere from zero to up to 25 degrees in a random direction. 122 00:07:12,400 --> 00:07:15,190 And of course, I can do all the way up to like 90 degrees. 123 00:07:15,190 --> 00:07:18,130 So you see some of them are going out horizontally. 124 00:07:18,980 --> 00:07:19,910 The next one. 125 00:07:19,910 --> 00:07:20,240 What else? 126 00:07:20,240 --> 00:07:21,830 We got shape. 127 00:07:21,950 --> 00:07:22,920 This one's kind of cool. 128 00:07:22,950 --> 00:07:25,100 It lets you pick the shape of the emitter. 129 00:07:25,130 --> 00:07:26,120 What does that mean? 130 00:07:26,150 --> 00:07:27,890 So basically, right now it's set to box. 131 00:07:27,890 --> 00:07:32,780 So you can imagine that the particle emitter is in here like a box shape and it's emitting particles 132 00:07:32,780 --> 00:07:33,260 from the top. 133 00:07:33,260 --> 00:07:35,780 But I continue to like sphere. 134 00:07:36,260 --> 00:07:38,720 And now that means that this particle emitter. 135 00:07:38,750 --> 00:07:43,430 Think of a big sphere in here and it's just shooting out particles in all directions and change it to 136 00:07:43,430 --> 00:07:44,960 like a flat disk. 137 00:07:45,260 --> 00:07:49,520 So now has just like a disk in there, or you can change it to like a cylinder. 138 00:07:49,790 --> 00:07:51,710 So think of like a cylinder in here. 139 00:07:52,520 --> 00:07:55,850 And you can change the shape and out, which basically lets you change. 140 00:07:56,570 --> 00:08:01,820 If you want the particles to emit away from the shape which is outward, or if you want them to emit 141 00:08:01,820 --> 00:08:04,040 towards the shape which is inward. 142 00:08:04,070 --> 00:08:09,410 If I change the transparency here to point seven, you can see that these particles are emitting towards 143 00:08:09,410 --> 00:08:11,450 the centre of the shape and flying out. 144 00:08:11,780 --> 00:08:15,500 And if I set it to maybe something like in and out, it'll do a mix of both. 145 00:08:15,500 --> 00:08:20,800 Some of them will emit inwards and some of them will emit outwards shape partial. 146 00:08:20,810 --> 00:08:25,400 This is kind of a weird one, but basically kind of I'll put a little diagram up. 147 00:08:25,880 --> 00:08:28,430 It basically changes the shape of the shape. 148 00:08:28,430 --> 00:08:33,050 So like if I did 0.5, it kind of like tightens the top of a cone. 149 00:08:33,440 --> 00:08:35,720 So again, it's a pretty weird property. 150 00:08:37,570 --> 00:08:39,550 Shape Style is a simple one. 151 00:08:39,550 --> 00:08:43,990 Basically, whether or not you want the particles to emit from the surface of the object. 152 00:08:44,950 --> 00:08:50,800 So if I put this back to a box shape, you'll notice that these particles are only emitting from this 153 00:08:50,800 --> 00:08:51,160 face. 154 00:08:51,160 --> 00:08:56,650 But if I set it to volume now, they emit from anywhere within the volume of the shape. 155 00:08:56,650 --> 00:08:58,270 That's just the difference between the two. 156 00:08:58,420 --> 00:09:04,030 The flipbook flipbook layout, this property allows you to animate particles. 157 00:09:04,030 --> 00:09:09,370 So what you would do is you would select a grid style and it allows you to fill it up with like different 158 00:09:09,370 --> 00:09:12,490 sections of pictures that you can change between each one. 159 00:09:12,490 --> 00:09:13,420 It's like animating. 160 00:09:13,420 --> 00:09:17,410 Like if you ever seen a flipbook and you run your thumb through it and it looks like an animation, 161 00:09:17,410 --> 00:09:18,790 that's basically what this does. 162 00:09:19,540 --> 00:09:20,710 Acceleration. 163 00:09:21,400 --> 00:09:27,190 Basically accelerate the particles in a particular global direction, like the global x axis is this 164 00:09:27,190 --> 00:09:27,730 way. 165 00:09:28,150 --> 00:09:33,620 So I could accelerate the particles in that direction by like maybe like we'll put five here and I'll 166 00:09:33,640 --> 00:09:36,640 kind of looks like there's a little bit of wind in my game. 167 00:09:37,340 --> 00:09:40,580 Just a little bit of wind and maybe I can do ten. 168 00:09:41,000 --> 00:09:43,130 And now we kind of got like a hurricane. 169 00:09:44,410 --> 00:09:45,670 Or you can do 100. 170 00:09:47,710 --> 00:09:48,260 Yeah. 171 00:09:48,460 --> 00:09:49,600 Pretty simple. 172 00:09:49,780 --> 00:09:51,970 Maybe we'll do 100 in the Y direction. 173 00:09:52,540 --> 00:09:53,500 Super fast. 174 00:09:53,500 --> 00:09:54,580 Super crazy. 175 00:09:54,700 --> 00:09:56,770 That's just acceleration right there. 176 00:09:57,100 --> 00:09:58,660 Next section, drag. 177 00:09:58,900 --> 00:10:00,040 Now, this one's kind of cool. 178 00:10:00,220 --> 00:10:04,410 This basically determines the rate at which the particles will lose their speed. 179 00:10:04,420 --> 00:10:10,300 So if I put this at, like, five, you'll notice that over time, the particles are losing half of 180 00:10:10,300 --> 00:10:11,350 their speed. 181 00:10:11,500 --> 00:10:15,970 So lose half, lose half, lose half, lose half, lose half until it basically stops. 182 00:10:16,640 --> 00:10:17,120 Lock two. 183 00:10:17,720 --> 00:10:18,830 This one's kind of interesting. 184 00:10:18,830 --> 00:10:21,220 So if you notice, if I move my particle emitter around. 185 00:10:21,920 --> 00:10:24,590 See, the particles are free to move wherever they like. 186 00:10:24,980 --> 00:10:30,620 But if I do locked apart now, if I move my part around, they are locked to the part. 187 00:10:31,220 --> 00:10:34,010 There is no free movement for the particles anymore. 188 00:10:34,980 --> 00:10:36,340 Next is time scale. 189 00:10:36,360 --> 00:10:37,620 This one's pretty simple. 190 00:10:37,650 --> 00:10:43,950 Set it at one, which is normal time, but I could set it to like 0.5, which is half of our current 191 00:10:43,950 --> 00:10:47,160 time set all the way down to like 0.1. 192 00:10:47,160 --> 00:10:49,830 And now they're moving in slow motion. 193 00:10:50,780 --> 00:10:52,730 But we'll just leave it at one very simple. 194 00:10:52,790 --> 00:10:56,470 And then the last property is velocity inheritance. 195 00:10:56,480 --> 00:10:57,950 This one's a little weird. 196 00:10:57,950 --> 00:11:00,590 I'm not exactly sure how it works. 197 00:11:00,590 --> 00:11:07,790 The wiki states that this inherits the velocity of the base part, so basically the part that this particle 198 00:11:07,790 --> 00:11:10,190 emitter is parented to. 199 00:11:10,610 --> 00:11:16,310 If this is an unanchored part and it's moving around, it has a velocity, it will inherit that velocity 200 00:11:16,310 --> 00:11:17,150 in some way. 201 00:11:17,420 --> 00:11:23,840 But it says that it uses the dot velocity property of a part which is deprecated. 202 00:11:23,990 --> 00:11:29,270 We no longer use dot velocity, instead we use assembly linear velocity. 203 00:11:29,540 --> 00:11:34,550 And I was messing around trying to see if this works and I couldn't get it to work so I wouldn't worry 204 00:11:34,550 --> 00:11:35,870 about this property for now. 205 00:11:36,170 --> 00:11:39,110 So there's your overview of particle emitters. 206 00:11:39,560 --> 00:11:43,430 All these properties with numbers you can animate them like the transparency. 207 00:11:43,430 --> 00:11:45,590 Like maybe I want to fade out over time. 208 00:11:45,590 --> 00:11:46,820 Check that out. 209 00:11:46,850 --> 00:11:48,290 So yeah, very cool. 210 00:11:48,290 --> 00:11:49,340 Particle emitters.